package com.woniuxy.entity;

import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Digits;
import javax.validation.constraints.Email;
import javax.validation.constraints.NotEmpty;
import java.util.List;

public class User {
    @NotEmpty
    String name;
    @Range(min=0,max=150)
    int age;
    @Email
    String email;
    List<GirlFriend> list;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public List<GirlFriend> getList() {
        return list;
    }

    public void setList(List<GirlFriend> list) {
        this.list = list;
    }

    @Override
    public String toString() {
        return "User{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", email='" + email + '\'' +
                ", list=" + list +
                '}';
    }

    public User() {
    }

    public User(String name, int age, String email, List<GirlFriend> list) {
        this.name = name;
        this.age = age;
        this.email = email;
        this.list = list;
    }
}
